Some useful Sublime tricks
What is the difference between symbol and definition? Sublime Text now scans the files in your project, and builds an index of which files contain which symbols. This backs the new features Goto Definition and Goto Symbol in Project, both of which are available from the Goto menu. Goto Definition takes you to the definition of the symbol under the caret, while Goto Symbol in Project prompts you to select a symbol via fuzzy matching, and then takes you to the definition of that symbol. What is Sublime status bar? The bottom bar shows your project git status for my example. What is Sublime console? It is a Python console. It is a Python interpreter. Use it to check Sublime settings and write plugins. Sublime Text 2 has Python embedded, and the console let's you inspect the current editor state, and create python code directly in the console to manipulate that state. See the API reference to see what you can do. Sublime Text 2 extensions are thus written in Python, and any logging they do ends up on that console as well. So indeed, you can see the console as a debugger as well, if there are any python exceptions they'd be printed to that console. Hot exit: Mac Cmd+Q: quit Sublime and save all the changes for next open. WIndowsAlt+F4 Command Palette ctrl + shift + p The command palette let’s you access pretty much anything in the settings menus, call your package commands, change file syntax, handle Sublime projects, and so much more. For instance, you are able to call Git commands add, branch, commit, push, and pull all from the command palette. File Switching ctrl + p Sublime Text provides a really fast way to open up new files. Just press ctrl + p and start typing the name of the file you want. Once it shows up, just press enter and start typing directly into that file! Goto Symbols ctrl + r When you have a large file with a bunch of methods, pressing ctrl + r will list them all and make them easier to find. Just start typing the one you want and press enter. Multi-Edit ctrl + click This is in my opinion, the absolute best feature of Sublime. After using it here, it’s hard to go back to other text editors. There are many different ways to use multi-edit: *ctrl + d: Select the current word and the next same word *ctrl + click: Every place you click will create a cursor to edit *ctrl + shift + f AND alt + enter: Find a word in your files and then select them all Snippets Snippets are yet another great feature of Sublime Text. You can use the pre-installed ones, build your own, or install a package that has more. All you have to do is type in a word and it will expand into your snippet. For example, typing lorem will generate lorem ipsum text. To Use: Type a word that activates a snippet (ie lorem) and press tab. Projects Projects is an integral part of my workflow in Sublime Text. A project is just a Sublime workspace in which your folders are open and stored in the sidebar. This helps since you can define a project and add folders to it, and be able to switch between folders quickly. Using projects, you will no longer have to go digging in Windows Explorer or Finder to get the project you want and drag it into Sublime. To Save a Project: Go into the command palette and type save project To Switch Projects: ctrl + alt + p https://github.com/SublimeCodeIntel/SublimeCodeIntel Thits plugin enables you jump between symbols across files. Using * Start typing code as usual, autocomplete will pop up whenever it's available. SublimeCodeIntel will also allow you to jump around symbol definitions even across files with just a click ..and back. * *;For Mac OS X *;*Jump to definition = Control+Click *;*Jump to definition = Control+Command+Alt+Up *;*Go back = Control+Command+Alt+Left *;*Manual Code Intelligence = Control+Shift+space *;For Linux *;*Jump to definition = Super+Click *;*Jump to definition = Control+Super+Alt+Up *;*Go back = Control+Super+Alt+Left *;*Manual Code Intelligence = Control+Shift+space *;For Windows *;*Jump to definition = Alt+Click *;*Jump to definition = Control+Windows+Alt+Up *;*Go back = Control+Windows+Alt+Left *;*Manual Code Intelligence = Control+Shift+space Don't despair! The first time you use it it needs to build some indexes and it can take more than a few seconds. It just works! Category:Sublime Category:CodeIntel